/*
 * @Author: silas 
 * @Date: 2021-08-25 15:08:14 
 * @Last Modified by: silas
 * @Last Modified time: 2021-08-25 15:25:30
 */
<template>
    <div class="tobBtoC">
        <el-tabs v-model="activeName" @tab-click="handleClick" ref="tabs">
            <el-tab-pane label="光网线路" name="first">
                <tab1 ref="tab1"></tab1>
            </el-tab-pane>
            <el-tab-pane label="导入记录" name="second">
                <tab2 ref="tab2"></tab2>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import prefixAPI from "@/api/prefixAPI";
import { getCookie } from "@/common/js/cookie";
import { getSessionStorage } from "@/common/js/storage";
import { $budgetAPI } from "@/api";
import tab1 from "./line-tab1";
import tab2 from "./line-tab2";
export default {
    name: "lightLineTabs",
    data() {
        return {
            activeName: 'first',
        }
    },
    components: {
        tab1,
        tab2,
    },
    mounted () {
        var that = this;

        if(that.activeName == 'first') {
            that.$refs.tab1.init();
        }
        if(that.$route.query && that.$route.query.type == 'second') {
            that.activeName = 'second'
            that.$refs.tab2.init();
        }
    },
    data() {
        return {
            form: {
                time: "",
            },
            tableData: [],
            tableLoading: false,
            activeName: "first",
        };
    },
    methods: {
        handleClick(tab, event) {
            var that = this;

            if (tab.name == "first") {
                that.$refs.tab1.init();
            }
            if (tab.name == "second") {
                that.$refs.tab2.init();
            }
            if (tab.name == "third") {
                that.$refs.tab3.init();
            }
        },
    },
};
</script>

<style lang="scss" scoped>
.remark {
    padding-top: 5px;
    text-align: left;
    .attention {
        font-weight: bold;
    }
}
.table-content {
    .table-header {
        display: flex;
        justify-content: space-between;
        .table-title {
            font-size: 14px;
            font-weight: bold;
            height: 30px;
            line-height: 30px;
            span {
                display: inline-block;
                width: 5px;
                height: 5px;
                background-color: #418ee9;
                border-radius: 1000%;
                overflow: hidden;
                margin-right: 10px;
                margin-bottom: 3px;
            }
        }
    }
    .content {
        margin-top: 15px;
    }
}
</style>
